package passworks.Gates;

import passworks.*;

public class LED extends GateBase {

    private boolean state;

    public LED(int id) {
        super(id);
        className = "LED";
        state = false;

        Logger.Print(className, className, Direction.IN, ownID);
        Logger.Print(className, className, Direction.OUT, ownID);
    }

    boolean GetState() {
        return state;
    }

    public void SetOutputs() {
        Logger.Print(className, "SetOutputs", Direction.IN, ownID);

        /*
         * Tenyleges logika
         */
        state = input.get(0).GetState();


        Logger.Print(className, "SetOutputs", Direction.OUT, ownID);
    }

     @Override
    public void Init() {
        state = false;
    }
}
